import request from "../utils/request";


export default {
  // 查询医院列表
  getHospList(page, limit, searchObj){
    return request({
      url: `/admin/hosp/hospital/list/${page}/${limit}`,
      methods: 'get',
      params: searchObj
    })
  },
  findByDictCode(dictCode){
    return request({
      url: `/admin/cmn/dict/findByDictCode/${dictCode}`,
      method: 'get'
    })
  },
  findByParentId(parentId){
    return request({
      url: `/admin/cmn/dict/findChildData/${parentId}`,
      method: 'get'
    })
  },
  updateHospStatus(id, status){
    return request({
      url: `/admin/hosp/hospital/updateHospStatus/${id}/${status}`,
      method: 'post'
    })
  },
  getHospById(id){
    return request({
      url: `/admin/hosp/hospital/showHospDetail/${id}`,
      method: 'get'
    })
  },
  getScheduleTreeByHoscode(hoscode){
    return request({
      url: `/admin/hosp/department/getDeptList/${hoscode}`,
      method: 'get'
    })
  },
  getScheduleRule(page, limit, hoscode, depcode){
    return request({
      url: `/admin/hosp/schedule/getScheduleRule/${page}/${limit}/${hoscode}/${depcode}`,
      method: 'get'
    })
  },
  getScheduleDetail(hoscode, depcode, workDate){
    return request({
      url: `/admin/hosp/schedule/getScheduleDetail/${hoscode}/${depcode}/${workDate}`,
      method: 'get'
    })
  }

}
